#include <limits.h>
void func(signed long s_a){
    signed long result;
    if (s_a == LONG_MIN){
        /* Handle error */
    } else {
        result = -s_a;
    }
    /* ... */
}